package com.nbicc.common.utils;

public class OSUtils {

    /**
     * 判断是windows系统还是linu系统
     * @return		win   /   linux
     */
    public static String getOSType() {
        String separator = System.getProperties().getProperty("file.separator");
        /** For Windows */
        if ("\\".equals(separator)) {
            return "win";
        }
        /** For unix*/
        if ("/".equals(separator)) {

            String osname = System.getProperties().getProperty("os.name");
            if(osname.toUpperCase().startsWith("MAC")){
                return "mac";
            }else if(osname.toUpperCase().startsWith("LINUX")){
                return "linux";
            }

            return "linux";
        }
        return null;
    }

}
